<!DOCTYPE type>
<html >
	<head>
		<meta charset="utf-8"/>
		<title>anjular测试</title>
		<script src="../js/angular.min.js"></script>						
	</head>
	
	<body ng-app="myapp">
		<div ng-controller="mycontroller">
			<div >当前地址：{{url}}</div>
			<button ng-click="onclick()">显示地址</button>	
		</div>

	</body>	
	<script>
		var app=angular.module("myapp",[]);
		app.controller("mycontroller",function($scope,$location){
			$scope.onclick = function(){
				$scope.url=$location.absUrl();
			}
		});
		
		

	</script>	
</html>